package org.bt.common.validator;

import org.bt.common.validator.aspect.Null;

import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;

/**
 * NullValidator
 * <p>
 * Created on 2020/1/8
 *
 * @author tongw
 */
public class NullValidator implements ConstraintValidator<Null, Object> {
    public NullValidator() {
    }

    @Override
    public boolean isValid(Object object, ConstraintValidatorContext constraintValidatorContext) {
        return object == null;
    }
}
